/**
 * 校验层
 */
module.exports = {
  isUid (req, res, next) {
    if (req.query && req.query.id) {
      return next()
    }
    return res.error('id不能为空')
  },

  valLogin (req, res, next) {
    if (req.body && req.body.user && req.body.pass) {
      return next()
    }
    return res.error('缺少(user/pass),无法登录')
  }
}
